import pygame
from pygame.locals import *
import random
import math

class TestScene:
	def __init__(self, game_app, py_screen):
		print "menu create"
		self.screen = py_screen
		self.ws = game_app
		
		self.windows_bgcolor = (63,63,63)
		
		self.bal_color = (128,128,128)
		
		self.balls = []
		
		for i in range(1,100):
			b = (int(math.ceil(15 + random.random() * 590)),int(math.ceil(15 + random.random() * 420)))
			print b
			self.balls.append(b)
		
	def Update(self):
		for event in pygame.event.get():
			if event.type == QUIT:
				print "esc down"
				self.ws.mainLoop = False
			if event.type == KEYDOWN:
				self.ws.SetCurrentScene(1)
				return
		self.screen.fill(self.windows_bgcolor)
		
		for i in self.balls:
			pygame.draw.circle(self.screen,self.bal_color,i,15)
		
		pygame.display.update()